package com.example.morealipy.util;

/**
 * <pre>
 *     author : wangkui
 *     e-mail : wangkui20090909@sina.com
 *     time   : 2019/10/21 16:26
 *     desc   : 防抖动点击
 *     version: 1.0
 * </pre>
 */
public class QuickClickUtil {
    private static int interval_time  = 500;
    private static long lastClick = 0;
    public static boolean isQuickClick(){

        long curClickTime = System.currentTimeMillis();
        boolean isQuick = false;
        if((curClickTime - lastClick) > interval_time){
            isQuick =  true;
        }
        lastClick = curClickTime;
        return isQuick;
    }
}
